-
Notifications
You must be signed in to change notification settings - Fork 181
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Handle vc reboot session invalid for listview #3064
Handle vc reboot session invalid for listview #3064
Conversation
6b476b1
to
16f8332
Compare
16f8332
to
d6e7490
Compare
e514174
to
f87dde9
Compare
f87dde9
to
8938cff
Compare
ae97b15
to
6addbcf
Compare
/ok-to-test |
/approve |
6addbcf
to
9fa791a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/approve
/lgtm
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: adikul30, deepakkinni, divyenpatel The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
What this PR does / why we need it:
This PR refactors the listview session logic.
A new
isReady
boolean represents the status of the listview + property collector mechanism. When this is true, the property collector is listening, when this is false, it's in the process of being created/re-created.ResetVirtualCenter
will store the latest VirtualCenter object reference when a credential change happens but not invalidate the ongoing property collector connection.isSessionValid
will check if the ongoing session is valid. If it's invalid, it will set theisReady
to false and cancel the context on which the property collector is running. This will cause the listview object and property collector to be re-created but this time with the most updated credentials.AddTask
&RemoveTask
will first check if theisReady
state before performing any other operations. Even after checking ifisReady
is true and session is valid but adding task to listview returns an error, this means that the credentials with which the listview object was created is no longer valid. So, it will set theisReady
to false, cancel the property collector context, return failure and let listenToTaskUpdates() re-create the listview object and start listening again.Which issue this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close that issue when PR gets merged): fixes #Testing done:
session killed from VC
2/2 passing for snapshot restore during VC reboot test but logs not captured and setup is now cleaned up.
Special notes for your reviewer:
Release note: